<%@ page language="java" contentType="text/html" import="com.dao.*,com.beans.*,java.util.*" pageEncoding="utf-8"%>
<%String path = request.getContextPath();String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="css/maintable.css"></link>
<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
</head>

<body>

	
	<div class="div_title">
		<div class="div_titlename">
			<img src="images/san_jiao.gif"><span>分类管理 | 商品分类维护</span>
		</div>
	</div>

	<form id="cate_manage" action="CateServlet.do?flag=manage" method="post">
		<table class="main_table">
			<tr>
				<th>一级分类</th>
				<th>操作</th>
				<th>二级分类</th>
				<th>操作</th>
			</tr>
			
			<c:forEach var="cate" items="${cateList}">
				<tr>
					<td width="15%">
						${cate.cateName}
					</td>
					 
					<td width="15%">
						<a href="CateServlet.do?flag=searchforupdateBig&id=${cate.id}">修改</a> |
						<a href="CateServlet.do?flag=delBigCate&id=${cate.id}" onclick="return confirm('确定删除？')">删除</a>
					</td>
					
					<td>
						 <c:forEach var="sub_cate" items="${cate.subCateList}">
							 ${sub_cate.cateName}<br>
						
						 </c:forEach>
					 </td>
					 
					 <td>
						<c:forEach var="sub_cate" items="${cate.subCateList}">
						 	<a href="CateServlet.do?flag=searchforupdateSmall&id=${sub_cate.id}">修改</a> |
						 	<a href="CateServlet.do?flag=delSmallCate&id=${sub_cate.id}" onclick="return confirm('确定删除？')">删除</a><br>
					 	</c:forEach>
					</td>
				</tr>
			</c:forEach>
		</table>
	</form>
	
</body>
</html>
